home *** CD-ROM | disk | FTP | other *** search
- /* _ s l o t
- *
- * Locate the stream slot with the specified FILE pointer. If the
- * pointer is NULL, this routine will locate the first free slot.
- * The function will return a pointer to the slot, otherwise
- * NULL.
- *
- * Patchlevel 1.0
- *
- * Edit History:
- */
-
- #include "stdiolib.h"
-
- /*LINTLIBRARY*/
-
- FILE **_slot(fp)
-
- FILE *fp; /* stream required */
-
- {
- FILE **sp; /* slot in table */
- int n; /* number of slots */
-
- for (n = _NFILE, sp = _iop; *sp != fp; sp++)
- if (--n < 0)
- return NULL;
-
- return sp;
- }
-